package com.assignwork.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.List;

@Data
public class TrainShiftStatisticsVO {
    @Excel(name = "日期", orderNum = "1" , width = 15)
    @DateTimeFormat(
            pattern = "yyyy-MM-dd"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    @ApiModelProperty(name = "时间")
    private String planDate;


    @ExcelCollection(name = "甲班", orderNum = "2")
    private List<jb> jb;
    @ExcelCollection(name = "乙班", orderNum = "3")
    private List<yb> yb;
    @ExcelCollection(name = "丙班", orderNum = "4")
    private List<bb> bb;
    @ExcelCollection(name = "丁班", orderNum = "5")
    private List<db> db;

    @ExcelCollection(name = "合计", orderNum = "6")
    private List<hj> hj;

    @ApiModelProperty(name = "1")
    private String jdx;
    @ApiModelProperty(name = "1")
    private String jgz;
    @ApiModelProperty(name = "1")
    private String jsz;
    @ApiModelProperty(name = "1")
    private String jdz;
    @ApiModelProperty(name = "1")
    private String jgx;
    @ApiModelProperty(name = "1")
    private String jsx;


    @ApiModelProperty(name = "1")
    private String ydz;
    @ApiModelProperty(name = "1")
    private String ygz;
    @ApiModelProperty(name = "1")
    private String ysz;
    @ApiModelProperty(name = "1")
    private String ydx;
    @ApiModelProperty(name = "1")
    private String ygx;
    @ApiModelProperty(name = "1")
    private String ysx;


    @ApiModelProperty(name = "1")
    private String bdz;
    @ApiModelProperty(name = "1")
    private String bgz;
    @ApiModelProperty(name = "1")
    private String bsz;
    @ApiModelProperty(name = "1")
    private String bdx;
    @ApiModelProperty(name = "1")
    private String bgx;
    @ApiModelProperty(name = "1")
    private String bsx;


    @ApiModelProperty(name = "1")
    private String ddz;
    @ApiModelProperty(name = "1")
    private String dgz;
    @ApiModelProperty(name = "1")
    private String dsz;
    @ApiModelProperty(name = "1")
    private String ddx;
    @ApiModelProperty(name = "1")
    private String dgx;
    @ApiModelProperty(name = "1")
    private String dsx;
    private String hjx;
    private String hjz;

    public TrainShiftStatisticsVO(String planDate,String jdz, String jgz,String jsz,String jdx,String jgx,String jsx,
                                  String ydz, String ygz,String ysz,String ydx,String ygx,String ysx,
                                  String bdz, String bgz,String bsz,String bdx,String bgx,String bsx,
                                  String ddz, String dgz,String dsz,String ddx,String dgx,String dsx,
                                  String hjx,String hjz) {
        this.planDate = planDate;
        this.jdz = jdz ;
        this.jgz = jgz;
        this.jsz = jsz;
        this.jdx = jdx;
        this.jgx = jgx;
        this.jsx = jsx;
        this.ydz = ydz;
        this.ygz = ygz;
        this.ysz = ysz;
        this.ydx = ydx;
        this.ygx = ygx;
        this.ysx = ysx;
        this.ddz = ddz;
        this.dgz = dgz;
        this.dsz = dsz;
        this.ddx = ddx;
        this.dgx = dgx;
        this.dsx = dsx;
        this.bdz = bdz;
        this.bgz = bgz;
        this.bsz = bsz;
        this.bdx = bdx;
        this.bgx = bgx;
        this.bsx = bsx;
        this.hjx = hjx;
        this.hjz = hjz;
        // 在构造函数中为静态内部类的字段赋值
        this.jb = new ArrayList<>();
        this.yb = new ArrayList<>();
        this.bb = new ArrayList<>();
        this.db = new ArrayList<>();
        this.hj = new ArrayList<>();
        jb.add(new jb(this.jdz,this.jgz,this.jsz,this.jdx,this.jgx,this.jsx));
        yb.add(new yb(this.ydz,this.ygz,this.ysz,this.ydx,this.ygx,this.ysx));
        bb.add(new bb(this.bdz,this.bgz,this.bsz,this.bdx,this.bgx,this.bsx));
        db.add(new db(this.ddz,this.dgz,this.dsz,this.ddx,this.dgx,this.dsx));
        hj.add(new hj(this.hjx, this.hjz));
    }

    @Data
    public static class jb {
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String jdz;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String jgz;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String jsz;
    @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "卸")
    private String jdx;
    @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "卸")
    private String jgx;
    @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "卸")
    private String jsx;
    public jb(String jdz, String jgz,String jsz,String jdx,String jgx,String jsx) {
        this.jdz = jdz;
        this.jgz = jgz;
        this.jsz = jsz;
        this.jdx = jdx;
        this.jgx = jgx;
        this.jsx = jsx;
    }
    }

    @Data
    public static class yb {
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String ydz;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String ygz;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String ysz;
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String ydx;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String ygx;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String ysx;
        public yb(String ydz, String ygz,String ysz,String ydx,String ygx,String ysx) {
            this.ydz = ydz;
            this.ygz = ygz;
            this.ysz = ysz;
            this.ydx = ydx;
            this.ygx = ygx;
            this.ysx = ysx;
        }
    }


    @Data
    public static class bb {
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String bdz;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String bgz;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String bsz;
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String bdx;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String bgx;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String bsx;
        public bb(String bdz, String bgz,String bsz,String bdx,String bgx,String bsx) {
            this.bdz = bdz;
            this.bgz = bgz;
            this.bsz = bsz;
            this.bdx = bdx;
            this.bgx = bgx;
            this.bsx = bsx;
        }
    }


    @Data
    public static class db {
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String ddz;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String dgz;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String dsz;
        @Excel(name = "袋货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String ddx;
        @Excel(name = "钢货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String dgx;
        @Excel(name = "散货", orderNum = "1", type = 1, width = 10,groupName = "卸")
        private String dsx;
        public db(String ddz, String dgz,String dsz,String ddx,String dgx,String dsx) {
            this.ddz = ddz;
            this.dgz = dgz;
            this.dsz = dsz;
            this.ddx = ddx;
            this.dgx = dgx;
            this.dsx = dsx;
        }
    }
    @Data
    public static class hj {
        @Excel(name = "装", orderNum = "1", type = 1, width = 10,groupName = "装")
        private String hjz;
        @Excel(name = "卸", orderNum = "2", type = 1, width = 10,groupName = "卸")
        private String hjx;
        public hj(String hjx,String hjz ) {
            this.hjx = hjx;
            this.hjz = hjz;
        }

    }

}
